<template>
	<div id="homepage">
		demo page
	</div>
</template>

<script>
export default {
  name:'homepage',
	components:{

	},
	data () {
		return {

		}
	},
  created(){
    this.initData()
  },
	methods:{
    initData(){
      let params = {
        creditCode: '91330000712561789G',
        type:0
      }
      this.$https.get(this.$API.allViewMsg,{ params })
        .then(res=>{
          if(res.api_status){
            let company = {
              name:this.props.location.query.companyName,
              creditCode: res.data.baseMsg.creditCode,
              status: res.data.baseMsg.regStatus
            }
            localStorage.setItem('company',JSON.stringify(company))
            this.setState({
              data: res.data.baseMsg,
              purchase: res.data.purchaseContractList,
              payment: res.data.paymentContractList,
              bidList: res.data.bidMsgList,
              adminAuthority: res.adminAuthority
            })
          }
        })
    }
	}
}
</script>

<style lang="scss">
#homepage{

}
</style>
